<template>
    <el-drawer :title="$t('stats.game.game.drawer.details')" size="400px" :visible.sync="drawerVisible" @close="$emit('update:visible', false)">
        <vue-simplebar>
            <div class="pt-12 pb-12 pr-3" v-if="data.game_id">
                <el-form label-width="120px" class="detail">
                    <el-form-item :label="$t('game.setting.game.name')">
                        <component-page-games :game-code="data.game_id"></component-page-games>
                    </el-form-item>
                    <el-form-item :label="$t('game.setting.currency.name')">{{ data.currency }}</el-form-item>
                    <el-form-item :label="$t('stats.game.game.bet_base')">
                        <component-page-numeral :num="data.bet_base"></component-page-numeral>
                    </el-form-item>
                    <el-form-item :label="$t('stats.game.game.bet_num')">
                        <component-page-numeral :num="data.bet_num"></component-page-numeral>
                    </el-form-item>
                    <el-form-item :label="$t('stats.game.game.gain_player')">
                        <component-page-numeral :num="data.gain_player"></component-page-numeral>
                    </el-form-item>
                    <el-form-item :label="$t('stats.game.game.amount')">
                        <component-page-numeral :num="data.amount"></component-page-numeral>
                    </el-form-item>
                    <el-form-item :label="$t('stats.game.game.doc_count')">
                        <component-page-numeral :num="data.doc_count"></component-page-numeral>
                    </el-form-item>
                    <el-form-item :label="$t('stats.game.game.player_count')">
                        <component-page-numeral :num="data.player_count"></component-page-numeral>
                    </el-form-item>
                    <!--USD-->
                    <div class="pt-6 pl-6 pr-6 pb-4">
                        <el-divider>USD</el-divider>
                    </div>
                    <el-form-item :label="$t('stats.game.game.bet_base')">
                        <component-page-numeral :num="data.usd_bet_base"></component-page-numeral>
                    </el-form-item>
                    <el-form-item :label="$t('stats.game.game.bet_num')">
                        <component-page-numeral :num="data.usd_bet_num"></component-page-numeral>
                    </el-form-item>
                    <el-form-item :label="$t('stats.game.game.gain_player')">
                        <component-page-numeral :num="data.usd_gain_player"></component-page-numeral>
                    </el-form-item>
                    <el-form-item :label="$t('stats.game.game.amount')">
                        <component-page-numeral :num="data.usd_amount"></component-page-numeral>
                    </el-form-item>
                </el-form>
            </div>
        </vue-simplebar>
    </el-drawer>
</template>

<script>
export default {
    name: "ItemDetails",
    props: ['visible', 'data'],
    data() {
        return {
            drawerVisible: false,
        }
    },
    watch: {
        visible: function (n, o) {
            if (n) {
                // 显示抽屉
                this.drawerVisible = n;
            }
        }
    },
}
</script>

<style scoped>

</style>
